<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>热门电影评分分析 - 来源: https://movie.xxxx.com/top250</title>
                <script type="text/javascript" src="https://assets.pyecharts.org/assets/v5/echarts.min.js"></script>
            <script type="text/javascript" src="https://assets.pyecharts.org/assets/v5/jquery.min.js"></script>
            <script type="text/javascript" src="https://assets.pyecharts.org/assets/v5/jquery-ui.min.js"></script>
            <script type="text/javascript" src="https://assets.pyecharts.org/assets/v5/ResizeSensor.js"></script>

            <link rel="stylesheet" href="https://assets.pyecharts.org/assets/v5/jquery-ui.css">

</head>
<body >
    <style>.box {  } </style>
        <button onclick="downloadCfg()">Save Config</button>
    <div class="box">
                <div id="ac6e980d96ca4bf493ff7514a97f82bc" class="chart-container" style="width:960px; height:540px; "></div>
    <script>
        var chart_ac6e980d96ca4bf493ff7514a97f82bc = echarts.init(
            document.getElementById('ac6e980d96ca4bf493ff7514a97f82bc'), 'white', {renderer: 'canvas', locale: 'ZH'});
        var option_ac6e980d96ca4bf493ff7514a97f82bc = {
    "animation": true,
    "animationThreshold": 2000,
    "animationDuration": 1000,
    "animationEasing": "cubicOut",
    "animationDelay": 0,
    "animationDurationUpdate": 300,
    "animationEasingUpdate": "cubicOut",
    "animationDelayUpdate": 0,
    "aria": {
        "enabled": false
    },
    "color": [
        "#5470c6",
        "#91cc75",
        "#fac858",
        "#ee6666",
        "#73c0de",
        "#3ba272",
        "#fc8452",
        "#9a60b4",
        "#ea7ccc"
    ],
    "series": [
        {
            "type": "bar",
            "name": "\u8bc4\u5206",
            "legendHoverLink": true,
            "data": [
                9.7,
                9.6,
                9.6,
                9.6,
                9.5,
                9.5,
                9.5,
                9.5,
                9.5,
                9.5
            ],
            "realtimeSort": false,
            "showBackground": false,
            "stackStrategy": "samesign",
            "cursor": "pointer",
            "barMinHeight": 0,
            "barCategoryGap": "20%",
            "barGap": "30%",
            "large": false,
            "largeThreshold": 400,
            "seriesLayoutBy": "column",
            "datasetIndex": 0,
            "clip": true,
            "zlevel": 0,
            "z": 2,
            "label": {
                "show": true,
                "position": "right",
                "margin": 8,
                "formatter": "{c} \u5206",
                "valueAnimation": false
            }
        }
    ],
    "legend": [
        {
            "data": [
                "\u8bc4\u5206"
            ],
            "selected": {},
            "show": true,
            "padding": 5,
            "itemGap": 10,
            "itemWidth": 25,
            "itemHeight": 14,
            "backgroundColor": "transparent",
            "borderColor": "#ccc",
            "borderRadius": 0,
            "pageButtonItemGap": 5,
            "pageButtonPosition": "end",
            "pageFormatter": "{current}/{total}",
            "pageIconColor": "#2f4554",
            "pageIconInactiveColor": "#aaa",
            "pageIconSize": 15,
            "animationDurationUpdate": 800,
            "selector": false,
            "selectorPosition": "auto",
            "selectorItemGap": 7,
            "selectorButtonGap": 10
        }
    ],
    "tooltip": {
        "show": true,
        "trigger": "item",
        "triggerOn": "mousemove|click",
        "axisPointer": {
            "type": "line"
        },
        "showContent": true,
        "alwaysShowContent": false,
        "showDelay": 0,
        "hideDelay": 100,
        "enterable": false,
        "confine": false,
        "appendToBody": false,
        "transitionDuration": 0.4,
        "textStyle": {
            "fontSize": 14
        },
        "borderWidth": 0,
        "padding": 5,
        "order": "seriesAsc"
    },
    "xAxis": [
        {
            "name": "\u8bc4\u5206",
            "show": true,
            "scale": false,
            "nameLocation": "end",
            "nameGap": 15,
            "inverse": false,
            "offset": 0,
            "splitNumber": 5,
            "min": 9.2,
            "minInterval": 0,
            "splitLine": {
                "show": true,
                "lineStyle": {
                    "show": true,
                    "width": 1,
                    "opacity": 1,
                    "curveness": 0,
                    "type": "solid"
                }
            },
            "animation": true,
            "animationThreshold": 2000,
            "animationDuration": 1000,
            "animationEasing": "cubicOut",
            "animationDelay": 0,
            "animationDurationUpdate": 300,
            "animationEasingUpdate": "cubicOut",
            "animationDelayUpdate": 0
        }
    ],
    "yAxis": [
        {
            "show": true,
            "scale": false,
            "nameLocation": "end",
            "nameGap": 15,
            "axisLabel": {
                "show": true,
                "margin": 8,
                "fontSize": 12,
                "valueAnimation": false
            },
            "inverse": false,
            "offset": 0,
            "splitNumber": 5,
            "minInterval": 0,
            "splitLine": {
                "show": true,
                "lineStyle": {
                    "show": true,
                    "width": 1,
                    "opacity": 1,
                    "curveness": 0,
                    "type": "solid"
                }
            },
            "animation": true,
            "animationThreshold": 2000,
            "animationDuration": 1000,
            "animationEasing": "cubicOut",
            "animationDelay": 0,
            "animationDurationUpdate": 300,
            "animationEasingUpdate": "cubicOut",
            "animationDelayUpdate": 0,
            "data": [
                "\u8096\u7533\u514b\u7684\u6551\u8d4e",
                "\u9738\u738b\u522b\u59ec",
                "\u63a7\u65b9\u8bc1\u4eba",
                "\u8336\u9986",
                "\u7f8e\u4e3d\u4eba\u751f",
                "\u6cf0\u5766\u5c3c\u514b\u53f7",
                "\u8f9b\u5fb7\u52d2\u7684\u540d\u5355",
                "\u963f\u7518\u6b63\u4f20",
                "\u80cc\u9760\u80cc\uff0c\u8138\u5bf9\u8138",
                "\u9ad8\u5c71\u4e0b\u7684\u82b1\u73af"
            ]
        }
    ],
    "title": [
        {
            "show": true,
            "text": "\u8bc4\u5206\u6700\u9ad8\u7684\u524d10\u90e8\u7535\u5f71",
            "target": "blank",
            "subtext": "\u4e92\u52a8\u56fe\u8868",
            "subtarget": "blank",
            "padding": 5,
            "itemGap": 10,
            "textAlign": "auto",
            "textVerticalAlign": "auto",
            "triggerEvent": false
        }
    ]
};
        chart_ac6e980d96ca4bf493ff7514a97f82bc.setOption(option_ac6e980d96ca4bf493ff7514a97f82bc);
    </script>
<br/>                <div id="fd92072473ef4c2496118383b2d5f828" class="chart-container" style="width:520px; height:520px; "></div>
    <script>
        var chart_fd92072473ef4c2496118383b2d5f828 = echarts.init(
            document.getElementById('fd92072473ef4c2496118383b2d5f828'), 'white', {renderer: 'canvas', locale: 'ZH'});
        var option_fd92072473ef4c2496118383b2d5f828 = {
    "animation": true,
    "animationThreshold": 2000,
    "animationDuration": 1000,
    "animationEasing": "cubicOut",
    "animationDelay": 0,
    "animationDurationUpdate": 300,
    "animationEasingUpdate": "cubicOut",
    "animationDelayUpdate": 0,
    "aria": {
        "enabled": false
    },
    "color": [
        "#5470c6",
        "#91cc75",
        "#fac858",
        "#ee6666",
        "#73c0de",
        "#3ba272",
        "#fc8452",
        "#9a60b4",
        "#ea7ccc"
    ],
    "series": [
        {
            "type": "pie",
            "colorBy": "data",
            "legendHoverLink": true,
            "selectedMode": false,
            "selectedOffset": 10,
            "clockwise": true,
            "startAngle": 90,
            "minAngle": 0,
            "minShowLabelAngle": 0,
            "avoidLabelOverlap": true,
            "stillShowZeroSum": true,
            "percentPrecision": 2,
            "showEmptyCircle": true,
            "emptyCircleStyle": {
                "color": "lightgray",
                "borderColor": "#000",
                "borderWidth": 0,
                "borderType": "solid",
                "borderDashOffset": 0,
                "borderCap": "butt",
                "borderJoin": "bevel",
                "borderMiterLimit": 10,
                "opacity": 1
            },
            "data": [
                {
                    "name": "8.0-8.9",
                    "value": 143
                },
                {
                    "name": "9.0\u53ca\u4ee5\u4e0a",
                    "value": 107
                }
            ],
            "radius": [
                "35%",
                "65%"
            ],
            "center": [
                "55%",
                "55%"
            ],
            "label": {
                "show": true,
                "margin": 8,
                "formatter": "{b}: {c} \u90e8 ({d}%)",
                "valueAnimation": false
            },
            "labelLine": {
                "show": true,
                "showAbove": false,
                "length": 15,
                "length2": 15,
                "smooth": false,
                "minTurnAngle": 90,
                "maxSurfaceAngle": 90
            }
        }
    ],
    "legend": [
        {
            "data": [
                "8.0-8.9",
                "9.0\u53ca\u4ee5\u4e0a"
            ],
            "selected": {},
            "show": true,
            "left": "5%",
            "top": "20%",
            "orient": "vertical",
            "padding": 5,
            "itemGap": 10,
            "itemWidth": 25,
            "itemHeight": 14,
            "backgroundColor": "transparent",
            "borderColor": "#ccc",
            "borderRadius": 0,
            "pageButtonItemGap": 5,
            "pageButtonPosition": "end",
            "pageFormatter": "{current}/{total}",
            "pageIconColor": "#2f4554",
            "pageIconInactiveColor": "#aaa",
            "pageIconSize": 15,
            "animationDurationUpdate": 800,
            "selector": false,
            "selectorPosition": "auto",
            "selectorItemGap": 7,
            "selectorButtonGap": 10
        }
    ],
    "tooltip": {
        "show": true,
        "trigger": "item",
        "triggerOn": "mousemove|click",
        "axisPointer": {
            "type": "line"
        },
        "showContent": true,
        "alwaysShowContent": false,
        "showDelay": 0,
        "hideDelay": 100,
        "enterable": false,
        "confine": false,
        "appendToBody": false,
        "transitionDuration": 0.4,
        "formatter": "{b}: {c} \u90e8 ({d}%)",
        "textStyle": {
            "fontSize": 14
        },
        "borderWidth": 0,
        "padding": 5,
        "order": "seriesAsc"
    },
    "title": [
        {
            "show": true,
            "text": "\u8bc4\u5206\u533a\u95f4\u5206\u5e03",
            "target": "blank",
            "subtarget": "blank",
            "padding": 5,
            "itemGap": 10,
            "textAlign": "auto",
            "textVerticalAlign": "auto",
            "triggerEvent": false
        }
    ]
};
        chart_fd92072473ef4c2496118383b2d5f828.setOption(option_fd92072473ef4c2496118383b2d5f828);
    </script>
<br/>    </div>
    <script>
            $('#ac6e980d96ca4bf493ff7514a97f82bc').resizable().draggable().css('border-style', 'dashed').css('border-width', '1px');$("#ac6e980d96ca4bf493ff7514a97f82bc>div:nth-child(1)").width("100%").height("100%");
            new ResizeSensor(jQuery('#ac6e980d96ca4bf493ff7514a97f82bc'), function() { chart_ac6e980d96ca4bf493ff7514a97f82bc.resize()});
            $('#fd92072473ef4c2496118383b2d5f828').resizable().draggable().css('border-style', 'dashed').css('border-width', '1px');$("#fd92072473ef4c2496118383b2d5f828>div:nth-child(1)").width("100%").height("100%");
            new ResizeSensor(jQuery('#fd92072473ef4c2496118383b2d5f828'), function() { chart_fd92072473ef4c2496118383b2d5f828.resize()});
            var charts_id = ['ac6e980d96ca4bf493ff7514a97f82bc','fd92072473ef4c2496118383b2d5f828'];
function downloadCfg () {
    const fileName = 'chart_config.json'
    let downLink = document.createElement('a')
    downLink.download = fileName

    let result = []
    for(let i=0; i<charts_id.length; i++) {
        chart = $('#'+charts_id[i])
        result.push({
            cid: charts_id[i],
            width: chart.css("width"),
            height: chart.css("height"),
            top: chart.offset().top + "px",
            left: chart.offset().left + "px"
        })
    }

    let blob = new Blob([JSON.stringify(result)])
    downLink.href = URL.createObjectURL(blob)
    document.body.appendChild(downLink)
    downLink.click()
    document.body.removeChild(downLink)
}
    </script>
</body>
</html>
